package liangtWorkSpace.springAll.di.annotation.autoWrited.Impl;

import liangtWorkSpace.springAll.di.annotation.autoWrited.Bean.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

/**
 * @author liangt
 * @ClassName: StudentImpl
 * @title: StudentImpl
 * @projectName liangtWorkSpace.springAll.di.annotation.autoWrited.Impl
 * @description: TODO
 * @date 2020/10/16 11:23
 */
public class StudentImpl {

    @Autowired
    //指定具体的Bean--当多个Bean时使用
    @Qualifier("student1")
    private Student student;
    public StudentImpl(){
        System.out.println("Inside Profile constructor." );
    }
    public void printAge() {
        System.out.println("Age : " + student.getAge() );
    }
    public void printName() {
        System.out.println("Name : " + student.getName() );
    }

}
